package com.mkjb.dto;

import com.mkjb.entity.Role;
import com.mkjb.entity.User;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by DingJie on 2017/4/1.
 */
public class UserDto {
    private String uuid;
    private String username;
    private String password;
    private String roleUuid;
    /**
     * 是否启用
     * true:启用,false:禁用
     * 默认启用
     */
    private boolean enable;
    private List<Role> roleList = new ArrayList<>();//一个用户具有多个角色

    public UserDto(User user) {
        this.uuid = user.getUuid();
        this.username = user.getUsername();
        this.password = user.getPassword();
        this.roleList = user.getRoleList();
        this.enable = user.isEnable();
    }

    public UserDto() {
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRoleUuid() {
        return roleUuid;
    }

    public void setRoleUuid(String roleUuid) {
        this.roleUuid = roleUuid;
    }

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }
}
